package com.prs.crm.domain.cqunicom;

import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;

/**
 * @author LanXiaoGang
 * @E-mail:lan9liang@163.com
 * @qq:7857553326
 * @version 创建时间：2011-3-2 下午02:47:58 简单说明 订单
 */
@Entity
@Table(name = "cq_Order")
public class PoplarOrder extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@ManyToOne
	private Person person;

	@ManyToOne
	private Company company;

	@ManyToOne
	private Services services;

	@ManyToOne
	private BusinessOrder businessOrder;

	@ManyToOne
	private MonitorOrder monitorOrder;
	
	
	/**
	 * 订单提醒信息
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "remindOrder")
	private Set<BusinessRemind> businessRemind;
	
	/**
	 * 订单号
	 */
	private String orderCode;
	/**
	 * 公司名称
	 */
	private String comName;

	/**
	 * 客户名称
	 */
	private String customerName;

	/**
	 * 客户电话
	 */
	private String customerTel;
	/**
	 * 客户地址
	 */
	private String cusaddess;

	/**
	 * 下单时间
	 */
	private Date orderDate;
	
	/**
	 * 完成时间
	 */
	private  Date compleDate;

	/**
	 * 业务模式 派单模式 ，转接模式
	 * 
	 * @return
	 */
	private String modleName;

	/**
	 * 基本信息备注
	 * 
	 * @return
	 */
	@Lob
	private String basicRemark;

	/**
	 * 提醒次数
	 * 
	 * @return
	 */
	private long remindTime;

	/**
	 * 处理时长
	 * 
	 * @return
	 */
	private String handleTime;

	/**
	 * 是否修改
	 * 
	 * @return
	 */
	private String huifangUpdate;
	/**
	 * 修改原因
	 * 
	 * @return
	 */
	@Lob
	private String updateYuan;
	

	// 针对商家------------------
	/**
	 * 新订单状态 1.新订单 2.接收订单 3.拒绝订单
	 */
	private String newOrderState;
	
	/**
	 * 是否处理完成
	 */
	private  String processSucess;
	/**
	 * 接单人员
	 */
	@ManyToOne
	private Person accpectPerson;
	/**
	 * 接单时间
	 */
   private Date accpectDate;
	/**
	 * 判断是不是手工订单 1：手工单 2：不是手工单
	 * 
	 * @return
	 */
	private int orderStyles;
	/**
	 *  价格颜色设置
	 *  值为2存在价格差异
	 * @return
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private Integer priColor;
	
	/**
	 * 交易状态
	 * 值为为2存在差异,值为 3 存在蓝色差异
	 * @return
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private Integer tredeSatets;
	/**
	 * 自动处理
	 * 值为2表示是系统自动处理
	 * @return
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private  Integer  audState;
	

	

	public Integer getAudState() {
		return audState;
	}

	public void setAudState(Integer audState) {
		this.audState = audState;
	}

	public Integer getTredeSatets() {
		return tredeSatets;
	}

	public void setTredeSatets(Integer tredeSatets) {
		this.tredeSatets = tredeSatets;
	}

	public Integer getPriColor() {
		return priColor;
	}

	public void setPriColor(Integer priColor) {
		this.priColor = priColor;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public Date getCompleDate() {
		return compleDate;
	}

	public void setCompleDate(Date compleDate) {
		this.compleDate = compleDate;
	}

	public Services getServices() {
		return services;
	}

	public void setServices(Services services) {
		this.services = services;
	}

	public BusinessOrder getBusinessOrder() {
		return businessOrder;
	}

	public void setBusinessOrder(BusinessOrder businessOrder) {
		this.businessOrder = businessOrder;
	}

	public MonitorOrder getMonitorOrder() {
		return monitorOrder;
	}

	public void setMonitorOrder(MonitorOrder monitorOrder) {
		this.monitorOrder = monitorOrder;
	}

	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	public String getComName() {
		return comName;
	}

	public void setComName(String comName) {
		this.comName = comName;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getCustomerTel() {
		return customerTel;
	}

	public void setCustomerTel(String customerTel) {
		this.customerTel = customerTel;
	}

	public String getCusaddess() {
		return cusaddess;
	}

	public void setCusaddess(String cusaddess) {
		this.cusaddess = cusaddess;
	}

	public Date getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}

	public String getModleName() {
		return modleName;
	}

	public void setModleName(String modleName) {
		this.modleName = modleName;
	}

	public String getBasicRemark() {
		return basicRemark;
	}

	public void setBasicRemark(String basicRemark) {
		this.basicRemark = basicRemark;
	}

	public long getRemindTime() {
		return remindTime;
	}

	public void setRemindTime(long remindTime) {
		this.remindTime = remindTime;
	}

	public String getHandleTime() {
		return handleTime;
	}

	public void setHandleTime(String handleTime) {
		this.handleTime = handleTime;
	}

	public String getHuifangUpdate() {
		return huifangUpdate;
	}

	public void setHuifangUpdate(String huifangUpdate) {
		this.huifangUpdate = huifangUpdate;
	}

	public String getUpdateYuan() {
		return updateYuan;
	}

	public void setUpdateYuan(String updateYuan) {
		this.updateYuan = updateYuan;
	}

	public String getNewOrderState() {
		return newOrderState;
	}

	public void setNewOrderState(String newOrderState) {
		this.newOrderState = newOrderState;
	}

	public int getOrderStyles() {
		return orderStyles;
	}

	public void setOrderStyles(int orderStyles) {
		this.orderStyles = orderStyles;
	}

	public Person getAccpectPerson() {
		return accpectPerson;
	}

	public void setAccpectPerson(Person accpectPerson) {
		this.accpectPerson = accpectPerson;
	}

	public Date getAccpectDate() {
		return accpectDate;
	}

	public void setAccpectDate(Date accpectDate) {
		this.accpectDate = accpectDate;
	}

	public String getProcessSucess() {
		return processSucess;
	}

	public void setProcessSucess(String processSucess) {
		this.processSucess = processSucess;
	}

	public Set<BusinessRemind> getBusinessRemind() {
		return businessRemind;
	}

	public void setBusinessRemind(Set<BusinessRemind> businessRemind) {
		this.businessRemind = businessRemind;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
